<template>
	<view>
		<uni-card :is-shadow="false" :border="false">
			<u-text text="订单已完成" bold align="center"></u-text>
			<u-text text="感谢您对食尚学府外卖的信任,期待再次光临" type="info" align="center"></u-text>
		</uni-card>
		<uni-card padding="0 0 20rpx 0" :is-shadow="false" :border="false">
			<template v-slot:title>
				<uni-section class="decoration" :title="orderInfo.Business_name.name" type="line">
					<template v-slot:right>
						<u-text text="已下单" bold color="#999"></u-text>
					</template>
				</uni-section>
			</template>
			<uni-list :border="true">
				<uni-list-item v-for="item in orderInfo.Commotidy" :key="index" :title="'商品名称'+item.name"
					thumb-size="lg" :note="item.price"> </uni-list-item>
			</uni-list>
			<template v-slot:actions>
				<view class="dis-flex justify-between align-items-center" style="height: 70rpx;">
					<view class="dis-flex">
						<view style="width: 130rpx;padding-left: 20rpx;">
							<u--text type="info" text="订单金额:"></u--text>
						</view>
						<u--text :text="orderInfo.price+'元'"></u--text>
					</view>
					<u-button shape="circle" size="small" text="评价" customStyle="width:120rpx;margin:0;padding:0"
						@click.stop="toComment(item)"></u-button>
				</view>
			</template>
		</uni-card>
		<uni-card :is-shadow="false" :border="false">
			<view class="dis-flex">
				<view style="width: 120rpx;">
					<u-text type="info" text="配送地址"></u-text>
				</view>
				<u-text :text="orderInfo.floor+'单元'+orderInfo.tower+'楼'+orderInfo.room+'房间'" bold
					margin="0 20rpx"></u-text>
			</view>
			<view class="dis-flex">
				<view style="width: 120rpx;">
					<u-text type="info" text="配送服务"></u-text>
				</view>
				<u-text text="由食尚学府提供配送服务" bold margin="0 20rpx"></u-text>
			</view>
		</uni-card>
		<uni-card :is-shadow="false" :border="false">
			<view class="dis-flex justify-between">
				<view class="dis-flex">
					<u-text type="info" text="订单号码"></u-text>
					<u-text :text="orderInfo.order_number" bold margin="0 20rpx"></u-text>
				</view>
				<u-button text="复制" size="small" customStyle="width:100rpx;padding:0;margin:0"></u-button>
			</view>
			<view class="dis-flex">
				<view style="width: 120rpx;">
					<u-text type="info" text="订单时间"></u-text>
				</view>
				<u-text :text="orderInfo.time" bold margin="0 20rpx"></u-text>
			</view>
			<view class="dis-flex">
				<view style="width: 120rpx;">
					<u-text type="info" text="支付方式"></u-text>
				</view>
				<u-text text="在线支付" bold margin="0 20rpx"></u-text>
			</view>
		</uni-card>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				orderInfo: {}
			}
		},
		onLoad(options) {
			console.log(options);
			if (options.item) {
				this.orderInfo = JSON.parse(options.item)
			}
		},
		methods: {
			toComment() {
				uni.navigateTo({
					url: '/pages/comment/comment'
				})
			}
		}
	}
</script>

<style>

</style>